import request from "@/utils/request"

// 新人必听 TS
export interface RevisionModel {
    albums : []
    currentUid : number
    pageNum : number
    pageSize : number
    total : number
}

// 今日免费/现时热点 TS
export interface WebSiteModel {
    hotTrack : {
        hotTracks : []
    },
    limitedFreeAlbum : {
        limitedTimeFreeAlbums : []
    }
}



// 新人必听
// https://m.ximalaya.com/revision/category/v2/albums?pageNum={pageNum}&pageSize={pageSize}&sort=1
export const reqRevision = (pageNum: number, pageSize: number) => {
    return request.get<any, RevisionModel>(`/revision/category/v2/albums?pageNum=${pageNum}&pageSize=${pageSize}&sort=1`)
}

// 今日免费/现时热点
// ● https://m.ximalaya.com/web-site/main/page
export const reqWebSite = () => {
    return request.get<any , WebSiteModel>(`/web-site/main/page`)
}